require 'arknights/utils'

local auto_man = {}
auto_man.run_1_11 = function()
    local story_hint = {
      {x=600, y=953, c=0xffffff},
      {x=1051, y=954, c=0xffffff},
      {x=1042, y=957, c=0xffffff}
    }

    mSleep(506)
    waitWhileAllColors(story_hint, 500, function()
        randTap(1758, 88, 7, 69)
    end)
   
    mSleep(416)
    randTap(1200, 547, 7, 165)
    mSleep(25468)
    touchDown(550, 991)
    drag(550, 991, 232, -447, 50)
    mSleep(906)
    touchUp(782,544)

    mSleep(150)
    touchDown(812, 539)
    drag(812, 539, 544, -21, 50)
    mSleep(79)
    touchUp(1356,518)

    mSleep(2749)
    touchDown(301, 1004)
    drag(301, 1004, 349, -446, 50)
    mSleep(802)
    touchUp(650,558)

    mSleep(150)
    touchDown(684, 541)
    drag(684, 541, 313, 0, 50)
    mSleep(47)
    touchUp(997,565)

    mSleep(1990)
    touchDown(598, 971)
    drag(598, 971, 329, -551, 50)
    mSleep(668)
    touchUp(927,420)

    mSleep(150)
    touchDown(930, 390)
    drag(930, 390, 329, 0, 50)
    mSleep(306)
    touchUp(1259,413)

    mSleep(2678)
    randTap(1658, 92, 7, 72)
    mSleep(2206)
    randTap(1666, 80, 7, 71)
    mSleep(808)
    touchDown(431, 978)
    drag(431, 978, 387, -333, 50)
    mSleep(739)
    touchUp(818,645)

    mSleep(150)
    touchDown(794, 642)
    drag(794, 642, 526, -0, 50)
    mSleep(254)
    touchUp(1320,613)

    mSleep(640)
    randTap(1671, 87, 7, 61)
    mSleep(4661)
    randTap(1653, 75, 7, 92)
    mSleep(1081)
    touchDown(1114, 981)
    drag(1114, 981, -313, -542, 50)
    mSleep(904)
    touchUp(801,439)

    mSleep(150)
    touchDown(766, 409)
    drag(766, 409, 0, 466, 50)
    mSleep(223)
    touchUp(808,875)

    mSleep(1187)
    randTap(1629, 110, 7, 40)
    mSleep(11893)
    randTap(952, 1001, 7, 62)
    mSleep(778)
    touchDown(951, 968)
    drag(951, 968, 422, -708, 50)
    mSleep(647)
    touchUp(1373,260)

    mSleep(150)
    touchDown(1340, 265)
    drag(1340, 265, 0, 369, 50)
    mSleep(336)
    touchUp(1344,634)

    mSleep(414)
    randTap(887, 1026, 7, 113)
    mSleep(239)
    touchDown(936, 990)
    drag(936, 990, 614, -636, 50)
    mSleep(585)
    touchUp(1550,354)

    mSleep(150)
    touchDown(1529, 352)
    drag(1529, 352, -323, 0, 50)
    mSleep(129)
    touchUp(1206,397)

    mSleep(955)
    randTap(1118, 995, 7, 82)
    mSleep(150)
    touchDown(1131, 974)
    drag(1131, 974, 255, -595, 50)
    mSleep(656)
    touchUp(1386,379)

    mSleep(150)
    touchDown(1382, 362)
    drag(1382, 362, -342, 0, 50)
    mSleep(78)
    touchUp(1040,385)

    mSleep(6784)
    randTap(1262, 353, 7, 61)
    mSleep(620)
    randTap(932, 346, 7, 61)
    mSleep(556)
    randTap(1263, 259, 7, 82)
    mSleep(594)
    randTap(934, 330, 7, 72)
    mSleep(526)
    randTap(1429, 370, 7, 71)
    mSleep(620)
    randTap(932, 350, 7, 93)
    mSleep(676)
    touchDown(1467, 989)
    drag(1467, 989, -877, -658, 50)
    mSleep(1369)
    touchUp(590,331)

    mSleep(150)
    touchDown(548, 339)
    drag(548, 339, 508, 0, 50)
    mSleep(109)
    touchUp(1056,304)

    mSleep(698)
    touchDown(1641, 972)
    drag(1641, 972, -962, -565, 50)
    mSleep(708)
    touchUp(679,407)

    mSleep(150)
    touchDown(660, 416)
    drag(660, 416, 635, 0, 50)
    mSleep(252)
    touchUp(1295,382)

    mSleep(5507)
    touchDown(1807, 972)
    drag(1807, 972, -854, -203, 50)
    mSleep(708)
    touchUp(953,769)

    mSleep(150)
    touchDown(956, 786)
    drag(956, 786, 0, -394, 50)
    mSleep(253)
    touchUp(1024,392)

    mSleep(10000)

    -- mSleep(791)
    -- randTap(1206, 529, 7, 78)
    -- mSleep(22232)
    -- touchDown(725, 1002)
    -- drag(725, 1002, 225, -590, 50)
    -- mSleep(546)
    -- touchUp(950,412)

    -- mSleep(186)
    -- touchDown(950, 412)
    -- drag(950, 412, 165, -6, 50)
    -- mSleep(240)
    -- touchUp(1115,406)

    -- mSleep(1018)
    -- touchDown(93, 1023)
    -- drag(93, 1023, 696, -379, 50)
    -- mSleep(448)
    -- touchUp(789,644)

    -- mSleep(150)
    -- touchDown(789, 644)
    -- drag(789, 644, 198, -4, 50)
    -- mSleep(244)
    -- touchUp(987,640)

    -- mSleep(2435)
    -- touchDown(604, 1017)
    -- drag(604, 1017, 233, -464, 50)
    -- mSleep(489)
    -- touchUp(837,553)

    -- mSleep(161)
    -- touchDown(836, 536)
    -- drag(836, 536, 151, -3, 50)
    -- mSleep(245)
    -- touchUp(987,533)

    -- mSleep(2458)
    -- randTap(1661, 116, 7, 74)
    -- mSleep(4832)
    -- randTap(1654, 77, 7, 91)
    -- mSleep(2589)
    -- touchDown(1297, 993)
    -- drag(1297, 993, -449, -589, 50)
    -- mSleep(504)
    -- touchUp(848,404)

    -- mSleep(177)
    -- touchDown(826, 385)
    -- drag(826, 385, -1, 116, 50)
    -- mSleep(224)
    -- touchUp(825,501)

    -- mSleep(1676)
    -- randTap(1637, 90, 7, 90)
    -- mSleep(3159)
    -- randTap(1646, 97, 7, 89)
    -- mSleep(1107)
    -- touchDown(563, 1002)
    -- drag(563, 1002, 138, -460, 50)
    -- mSleep(611)
    -- touchUp(701,542)

    -- mSleep(183)
    -- touchDown(691, 538)
    -- drag(691, 538, 245, 8, 50)
    -- mSleep(150)
    -- touchUp(936,546)

    -- mSleep(863)
    -- randTap(1656, 101, 7, 83)
    -- mSleep(5491)
    -- touchDown(1130, 1001)
    -- drag(1130, 1001, 223, -622, 50)
    -- mSleep(670)
    -- touchUp(1353,379)

    -- mSleep(150)
    -- touchDown(1353, 379)
    -- drag(1353, 379, -217, -3, 50)
    -- mSleep(206)
    -- touchUp(1136,376)

    -- mSleep(598)
    -- touchDown(920, 987)
    -- drag(920, 987, 426, -715, 50)
    -- mSleep(647)
    -- touchUp(1346,272)

    -- mSleep(150)
    -- touchDown(1346, 272)
    -- drag(1346, 272, -3, 157, 50)
    -- mSleep(533)
    -- touchUp(1343,429)

    -- mSleep(6091)
    -- touchDown(1137, 1014)
    -- drag(1137, 1014, 351, -662, 50)
    -- mSleep(800)
    -- touchUp(1488,352)

    -- mSleep(150)
    -- touchDown(1488, 352)
    -- drag(1488, 352, -266, 5, 50)
    -- mSleep(150)
    -- touchUp(1222,357)

    -- mSleep(5688)
    -- randTap(1238, 235, 7, 69)
    -- mSleep(627)
    -- randTap(920, 328, 7, 70)
    -- mSleep(534)
    -- randTap(1403, 329, 7, 68)
    -- mSleep(561)
    -- randTap(914, 310, 7, 96)
    -- mSleep(717)
    -- touchDown(1658, 978)
    -- drag(1658, 978, -985, -551, 50)
    -- mSleep(578)
    -- touchUp(673,427)

    -- mSleep(150)
    -- touchDown(673, 427)
    -- drag(673, 427, 226, 13, 50)
    -- mSleep(156)
    -- touchUp(899,440)

    -- mSleep(905)
    -- touchDown(1623, 1007)
    -- drag(1623, 1007, -1048, -676, 50)
    -- mSleep(839)
    -- touchUp(575,331)

    -- mSleep(192)
    -- touchDown(557, 321)
    -- drag(557, 321, 150, 12, 50)
    -- mSleep(150)
    -- touchUp(707,333)

    -- mSleep(10792)
    -- touchDown(1831, 1005)
    -- drag(1831, 1005, -849, -221, 50)
    -- mSleep(768)
    -- touchUp(982,784)

    -- mSleep(150)
    -- touchDown(979, 779)
    -- drag(979, 779, -6, -150, 50)
    -- mSleep(255)
    -- touchUp(973,629)
end

return auto_man